'\" te
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 1983 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH REBOOT 8 "August 29, 2021"
.SH NAME
reboot \- restart the operating system
.SH SYNOPSIS
.nf
\fB/usr/sbin/reboot\fR [\fB-dlnq\fR] [\fIboot_arguments\fR]
.fi

.LP
.nf
\fB/usr/sbin/reboot\fR [\fB-f\fR [\fB-e\fR \fIenvironment\fR] | \fB-p\fR] [\fB-dlnq\fR] [\fIboot_arguments\fR]
.fi

.SH DESCRIPTION
The \fBreboot\fR utility restarts the kernel. The kernel is loaded into memory
by the PROM monitor, which transfers control to the loaded kernel.
.sp
.LP
On x86 systems, when the \fB-f\fR flag is specified, the running kernel will
load the next kernel into memory, then transfer control to the newly loaded
kernel. This form of \fBreboot\fR is shown in the second synopsis, above.
.sp
.LP
Although \fBreboot\fR can be run by the super-user at any time,
\fBshutdown\fR(8) is normally used first to warn all users logged in of the
impending loss of service. See \fBshutdown\fR(8) for details.
.sp
.LP
The \fBreboot\fR utility performs a \fBsync\fR(8) operation on the disks, and
then a multi-user reboot is initiated. See \fBinit\fR(8) for details. On x86
systems, reboot may also update the boot archive as needed to ensure a
successful reboot.
.sp
.LP
The \fBreboot\fR utility normally logs the reboot to the system log daemon,
\fBsyslogd\fR(8), and places a shutdown record in the login accounting file
\fB/var/adm/wtmpx\fR. These actions are inhibited if the \fB-n\fR or \fB-q\fR
options are present.
.sp
.LP
Normally, the system reboots itself at power-up or after crashes.
.SH OPTIONS
The following options are supported:
.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.sp .6
.RS 4n
Force a system crash dump before rebooting. See \fBdumpadm\fR(8) for
information on configuring system crash dumps.
.RE

.sp
.ne 2
.na
\fB\fB-e\fR\fR
.ad
.sp .6
.RS 4n
If \fB-f\fR is present, reboot to the specified boot environment.
.RE

.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.sp .6
.RS 4n
Fast reboot, bypassing firmware and boot loader. The new kernel will be loaded
into memory by the running kernel, and control will be transferred to the newly
loaded kernel. If disk or kernel arguments are specified, they must be
specified before other boot arguments.
.sp
This option is currently available only on x86 systems.
.sp
Service \fBsvc:/system/boot-config:default\fR is enabled by default. It
requires \fBsolaris.system.shutdown\fR as \fBaction_authorization\fR and
\fBvalue_authorization\fR. When the \fBconfig/fastreboot_default\fR property is
set to \fBtrue\fR, \fBreboot\fR will behave as \fBreboot\fR \fB-f\fR. The value
of this property can be changed using \fBsvccfg\fR(8) and \fBsvcadm\fR(8), to
control the default reboot behavior.
.sp
See \fBEXAMPLES\fR for details.
.RE

.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.sp .6
.RS 4n
Suppress sending a message to the system log daemon, \fBsyslogd\fR(8) about
who executed \fBreboot\fR.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.sp .6
.RS 4n
Avoid calling \fBsync\fR(2) and do not log the reboot to \fBsyslogd\fR(8) or
to \fB/var/adm/wtmpx\fR. The kernel still attempts to sync filesystems prior to
reboot, except if the \fB-d\fR option is also present. If \fB-d\fR is used with
\fB-n\fR, the kernel does not attempt to sync file systems.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.sp .6
.RS 4n
Reboot to prom. This flag can be used to reboot the system through firmware
without changing the default reboot behavior as denoted by the
\fBconfig/fastreboot_default\fR property setting in \fBsystem/boot-config\fR
service.
.sp
This option is currently available only on x86 systems. The \fB-p\fR and
\fB-f\fR options are mutually exclusive.
.RE

.sp
.ne 2
.na
\fB\fB-q\fR\fR
.ad
.sp .6
.RS 4n
Quick. Reboot quickly and ungracefully, without shutting down running processes
first.
.RE

.SH OPERANDS
The following operands are supported:
.sp
.ne 2
.na
\fB\fIboot_arguments\fR\fR
.ad
.sp .6
.RS 4n
An optional \fIboot_arguments\fR specifies arguments to the \fBuadmin\fR(2)
function that are passed to the boot program and kernel upon restart. The form
and list of arguments is described in the \fBboot\fR(8) and \fBkernel\fR(8)
man pages. If the arguments are specified, whitespace between them is replaced
by single spaces unless the whitespace is quoted for the shell. If the
\fIboot_arguments\fR begin with a hyphen, they must be preceded by the \fB--\fR
delimiter (two hyphens) to denote the end of the \fBreboot\fR argument list.
.RE

.SH EXAMPLES
\fBExample 1 \fRPassing the \fB-r\fR and \fB-v\fR Arguments to \fBboot\fR
.sp
.LP
In the following example, the delimiter \fB--\fR (two hyphens) must be used to
separate the options of \fBreboot\fR from the arguments of \fBboot\fR(8).

.sp
.in +2
.nf
example# \fBreboot -dl -- -rv\fR
.fi
.in -2
.sp

.LP
\fBExample 2 \fRRebooting Using a Specific Disk and Kernel
.sp
.LP
The following example reboots using a specific disk and kernel.

.sp
.in +2
.nf
example# \fBreboot disk1 kernel.test/unix\fR
.fi
.in -2
.sp

.LP
\fBExample 3 \fRFast Rebooting
.sp
.LP
The following examples use the \fB-f\fR option to perform fast reboots.

.sp
.LP
If service \fBsvc:/system/boot-config:default\fR is enabled and property
\fBconfig/fastreboot_default\fR is set to \fBtrue\fR, the \fB-f\fR option can
be omitted.

.sp
.LP
The following command reboots to the default entry in the boot
menu file \fBmenu.lst\fR.

.sp
.in +2
.nf
example# \fBreboot -f\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to another UFS root disk.

.sp
.in +2
.nf
example# \fBreboot -f -- '/dev/dsk/c1d0s0'\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to another ZFS root pool.

.sp
.in +2
.nf
example# \fBreboot -f -- 'rpool/ROOT/root2'\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to \fBmykernel\fR on the same disk with \fB-k\fR
option.

.sp
.in +2
.nf
example# \fBreboot -f -- '/platform/i86pc/mykernel/amd64/unix -k'\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to \fBmykernel\fR off another root disk mounted
on \fB/mnt\fR.

.sp
.in +2
.nf
example# \fBreboot -f -- '/mnt/platform/i86pc/mykernel/amd64/unix -k'\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to \fB/platform/i86pc/kernel/$ISADIR/unix\fR on
another boot environment named \fBsecond_root\fR.

.sp
.in +2
.nf
example# \fBreboot -f -e second_root\fR
.fi
.in -2
.sp

.sp
.LP
The following command reboots to the same kernel with \fB-kv\fR options.

.sp
.in +2
.nf
example# \fBreboot -f -- '-kv'\fR
.fi
.in -2
.sp

.sp
.LP
The following commands disable the fast-reboot-by-default behavior.

.sp
.in +2
.nf
example# \fBsvccfg -s "system/boot-config:default" \e\fR
\fBsetprop config/fastreboot_default=false\fR
example# \fBsvcadm refresh svc:/system/boot-config:default\fR
.fi
.in -2
.sp

.sp
.LP
The following commands re-enable the fast-reboot-by-default behavior.

.sp
.in +2
.nf
example# \fBsvccfg -s "system/boot-config:default" \e\fR
\fBsetprop config/fastreboot_default=true\fR
example# \fBsvcadm refresh svc:/system/boot-config:default\fR
.fi
.in -2
.sp

.LP
\fBExample 4 \fRRebooting to a Particular Boot Menu Entry
.sp
.LP
The following commands will reboot to entry \fB2\fR in the boot menu.

.sp
.in +2
.nf
example# \fBbootadm list-menu\fR
the location for the active menu is: /rpool/boot/menu.lst
Index  Default  Dataset             Menu
0      -        rpool/ROOT/test-182  test-182
1      *        rpool/ROOT/test-183  test-183
2      -        rpool/ROOT/test-183  test-183
example# \fBreboot 2\fR
.fi
.in -2
.sp

.SH FILES
.ne 2
.na
\fB\fB/var/adm/wtmpx\fR\fR
.ad
.sp .6
.RS 4n
login accounting file
.RE

.SH SEE ALSO
.BR mdb (1),
.BR sync (2),
.BR uadmin (2),
.BR reboot (3C),
.BR attributes (7),
.BR boot (8),
.BR dumpadm (8),
.BR fsck (8),
.BR halt (8),
.BR init (8),
.BR kernel (8),
.BR shutdown (8),
.BR svcadm (8),
.BR svccfg (8),
.BR sync (8),
.BR syslogd (8)
.SH NOTES
The \fBreboot\fR utility does not execute the scripts in
\fB/etc/rc\fInum\fR.d\fR or execute shutdown actions in \fBinittab\fR(5). To
ensure a complete shutdown of system services, use \fBshutdown\fR(8) or
\fBinit\fR(8) to reboot a Solaris system.
